﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MOMKeLABS.Controls.Popup
{
    public partial class StartMenuItem : UserControl
    {

        public delegate void ClickHandler(Object sender, MouseButtonEventArgs args);

        public event ClickHandler Click;

        public Type TypeOfApp
        {
            get
            {
                return (Type)GetValue(TypeOfAppProperty);
            }
            set
            {
                SetValue(TypeOfAppProperty, value);
            }
        }

        public string Caption
        {
            get
            {
                return (string)GetValue(CaptionProperty);
            }
            set
            {
                SetValue(CaptionProperty, value);
            }
        }

        public string ImageURL
        {
            get
            {
                return (string)GetValue(ImageURLProperty);
            }
            set
            {
                SetValue(ImageURLProperty, value);
            }
        }

        public static readonly DependencyProperty TypeOfAppProperty =
           DependencyProperty.Register(
           "TypeOfApp", typeof(Type),
           typeof(StartMenuItem), null);

        public static readonly DependencyProperty CaptionProperty =
           DependencyProperty.Register(
           "Caption", typeof(string),
           typeof(StartMenuItem), null);

        public static readonly DependencyProperty ImageURLProperty =
           DependencyProperty.Register(
           "ImageURL", typeof(string),
           typeof(StartMenuItem), null);



        public StartMenuItem()
        {
            InitializeComponent();

            this.DataContext = this;
        }


        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (Click != null)
            {
                Click(this, null);
            }
        }
    }
}
